    let box1 = echarts.init(document.getElementById('box1'));
    window.addEventListener('resize',function resizeChart(){
        box1.resize()
    })
    box1.setOption({
        tooltip: {
            trigger: 'axis',
            formatter:function(params){
                console.log(params)
                let res = params[0].name;
                for(let i = 0; i < params.length; i++){
                    res += '<br>' + params[i].seriesName+'&nbsp;&nbsp;&nbsp;&nbsp;'+params[i].value +'%'
                }
                return res
            },
            axisPointer: {
                type: 'shadow'
            }
        },
        toolbox: {
            show: true,
            feature: {
                mark: {show: true},
                dataView: {show: true, readOnly: false},
                saveAsImage: {show: true}
            }
        },
        legend: {data:['软件行业','互联网行业','IT制造行业'],
            color:'white'},
        xAxis: [
            {
                type: 'category',
                data: []
            }
        ],
        yAxis: [
            {type: 'value',
                axisLabel:{
                    formatter:'{value}%'
                }}
        ],
        series: [
            {
                name: '软件行业',
                type: 'bar',
                emphasis: {
                    focus: 'series'
                },
                data: []
            },
            {
                name: '互联网行业',
                type: 'bar',
                emphasis: {
                    focus: 'series'
                },
                data: []
            },
            {
                name: 'IT制造行业',
                type: 'bar',
                emphasis: {
                    focus: 'series'
                },
                data: []
            }
        ]
    });
    box1.showLoading({
        text:'请你稍稍休息片刻,Loading...',
        color:'blue',
        textColor:'red',
        maskColor:'rgba(160,255,255,0.2)'
    });
    $.get('./data/ageGroups.json').done(function(data) {
        box1.hideLoading();
        box1.setOption({
            xAxis: {
                data: data.age
            },
            series: [
                {
                    name: '软件行业',
                    type:'bar',
                    data: data.software
                },{
                    name: '互联网行业',
                    data: data.internet
                },{
                    name: 'IT制造行业',
                    data: data.IT
                }
            ]
        });
    });